Skip to content

[HTTP1Connection] Add download streaming backpressure test #435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

fabianfett
Copy link
Member

Motivation

In #427 we want to switch the implementation over to our new HTTPConnectionPool. When we do this, we want to remove the possibility to access the underlying channel. For this reason we need to remove a number of tests from HTTPClientInternalTests. As @weissi pointed out, we should at least still integration test downstream backpressure.

This pr replicates the behavior from HTTPClientInternalTests.testUploadStreamingBackpressure directly on the HTTP1Connection.

Changes

  • Move and adjust test from HTTPClientInternalTests.testUploadStreamingBackpressure
  • Rename the test to testDownloadStreamingBackpressure since we only test incoming bytes backpressure.

Result

An integration backpressure test, that survives #427.

@fabianfett fabianfett added the semver/none No version bump required. label Sep 22, 2021
@fabianfett fabianfett added this to the HTTP/2 support milestone Sep 22, 2021
@fabianfett fabianfett force-pushed the ff-integration-test-download-streaming branch 2 times, most recently from db307a2 to bc95874 Compare September 24, 2021 08:04
Copy link
Collaborator

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice patch!

@fabianfett fabianfett force-pushed the ff-integration-test-download-streaming branch from bc95874 to 4653c80 Compare September 24, 2021 13:45
@fabianfett
Copy link
Member Author

swift-nightly failed because of Sendable requirements.

@fabianfett fabianfett merged commit 7ff7ab4 into swift-server:main Sep 24, 2021
@fabianfett fabianfett deleted the ff-integration-test-download-streaming branch September 24, 2021 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants